import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '小节名',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '隶属章节id',
    align:"center",
    dataIndex: 'chapterId'
   },
   {
    title: '分类(1为视频，2为文档，3为图文，4为试卷)',
    align:"center",
    dataIndex: 'classify'
   },
   {
    title: '内容(如果分类是视频则为视频地址，为图文则图文内容，为试卷则试卷id)',
    align:"center",
    dataIndex: 'content'
   },
   {
    title: '文档地址',
    align:"center",
    dataIndex: 'documentPath'
   },
   {
    title: '需要学习时间',
    align:"center",
    dataIndex: 'requiredStudyTime'
   },
   {
    title: '创建用户',
    align:"center",
    dataIndex: 'createUser'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '小节名',
    field: 'name',
    component: 'Input',
  },
  {
    label: '隶属章节id',
    field: 'chapterId',
    component: 'Input',
  },
  {
    label: '分类(1为视频，2为文档，3为图文，4为试卷)',
    field: 'classify',
    component: 'InputNumber',
  },
  {
    label: '内容(如果分类是视频则为视频地址，为图文则图文内容，为试卷则试卷id)',
    field: 'content',
    component: 'InputTextArea',
  },
  {
    label: '文档地址',
    field: 'documentPath',
    component: 'Input',
  },
  {
    label: '需要学习时间',
    field: 'requiredStudyTime',
    component: 'InputNumber',
  },
  {
    label: '创建用户',
    field: 'createUser',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];
